home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / hardware / vb2091.lha / vb2091.doc < prev    next >
Encoding:
Text File  |  1995-02-22  |  9.0 KB  |  207 lines

  1.  
  2. vb2091 0.2b (c) in 1994 by Volker Barthelmann
  3.  
  4. INTRODUCTION
  5.  
  6.     ZorroII boards can only reach the lower 16MB of address space. So DMA
  7.     SCSI controllers must find another way to transfer data to expansion
  8.     RAM. Some of them (especially the A2091) do a very bad job in this
  9.     situation. In an A4000/40 transfer rates may drop to 50KB/s.
  10.     This program patches the (2nd.)scsi.device to use MEMF_24BITDMA
  11.     RAM as a buffer followed (in case of CMD_READ) by CopyMem().
  12.     It was developed with the A4000/A2091 combinbation in mind, but
  13.     should work with other configurations, too (see REQUIREMENTS). Some
  14.     people reported good results with GVP controllers.
  15.  
  16.     There have been some bugfixes, additional options and changes of the
  17.     commandline options since the last public release. So I am afraid all
  18.     users of previous versions will have to read this manual again
  19.     (especially the USAGE section).
  20.  
  21.  
  22. FEATURES
  23.  
  24.     There are already some PD utilities floating around that do a similar
  25.     job. So why may this one be better?
  26.  
  27.     - It patches the device instead of the Read() & Write() DOS-functions,
  28.       giving the following advantages:
  29.  
  30.       o Programs accessing the device directly (e.g. SysInfo, SCSI-Speed
  31.         or tape-handlers) are patched, too.
  32.       o Patching Read() doesn't seem to have any influence on LoadSeg(), so
  33.         those patches don't speedup loading of programs whereas vb2091 does.
  34.       o It is possible to use double-buffering and load into one buffer
  35.         while copying the contents of the other one to fastram. This makes
  36.         higher transfer rates possible. I wasn't able to get more than
  37.         800KB/s with DOS-level-patches, but could get over 1MB/s with
  38.         vb2091.
  39.  
  40.     - Some early A4000s (including mine :-( ) can't do DMA to onboard ram.
  41.       On such A4000s every transfer to/from chipmem will cause the
  42.       computer to hang. vb2091 can be told to redirect those transfers too.
  43.  
  44. WARNING
  45.  
  46.     FIRST: READ THIS ENTIRE FILE BEFORE TRYING OUT vb2091 !!
  47.     (This is meant seriously - I know this is a very badly written manual,
  48.     but it mentions some very important points.)
  49.  
  50.     This program is still beta and I can't give any warranty about anything.
  51.     I have tested it for some time and have not encountered serious
  52.     problems, but had no opportunity to test vb2091 on other configs,
  53.     so there may still be many bugs.
  54.     It seems to work fine with my system (A4000/40, broken DMA, A2091/7.0
  55.     ROMs, Quantum LPS270S+LT730, Tandberg streamer) in conjunction with
  56.     MapBoard, however there may be problems with the serial port.
  57.  
  58. REQUIREMENTS
  59.  
  60.     vb2091 has been compiled with gcc, so it needs ixemul.library in libs:
  61.     and ENV: assigned. Keep this in mind when placing it in Your startup-
  62.     sequence. There will probably be a version that has been compiled with SAS
  63.     in this distribution. This version doesn't have these requirements.
  64.  
  65.     As it uses the exec-functions CopyMem()/CacheControl(), it doesn't work
  66.     with early versions of Kickstart (sorry, I don't know since when these
  67.     functions are present - probably since 2.0).
  68.     vb2091 does not check for a correct version at the moment (sorry).
  69.  
  70.     You must have some MEMF_24BITDMA RAM (e.g. RAM on the controller or
  71.     chipmem) to be used as a buffer.
  72.  
  73.     I hope I haven't forgotten anything (of course a controller and some
  74.     expansion RAM would be quite useful).
  75.  
  76.  
  77. USAGE
  78.  
  79.     [run] vb2091 UNIT <unitlist> [DEVICE <device>] [BUFSIZE <bufsize>]
  80.                  [MAXN <number>] [MIN1BUF <size>] [MIN2BUF <size>]
  81.                  [BROKEN] [SINGLE] [NOCACHE] [NOWRITE]
  82.  
  83.     All the keywords must be uppercase! (sorry)
  84.  
  85.     UNIT    List of unitnumbers of devices to be patched, not separated by
  86.             spaces or commas, e.g. 014 for device 0, 1 and 4.
  87.             (default: no default - this MUST be specified)
  88.  
  89.     DEVICE  Name of the device to be patched.
  90.             (default: 2nd.scsi.device)
  91.  
  92.     BUFSIZE Size of buffer in kilobytes.
  93.             (default: 256)
  94.  
  95.     BROKEN  Use this if You have got an A4000 that cannot DMA the chipmem.
  96.             You MUST have some 24Bit fastmem (e.g. on the controller)
  97.             then - vb2091 will only accept MEMF_FAST|MEMF_24BITDMA RAM
  98.             as buffer then.
  99.  
  100.     SINGLE  Normally vb2091 uses double-buffering to get slightly higher
  101.             transfer rates; use SINGLE, if free processor time is more
  102.             important to You. Currently only CMD_READ is double-buffered,
  103.             CMD_WRITE is not.
  104.  
  105.     NOWRITE If You specify this option, only CMD_READ ist patched, whereas
  106.             CMD_WRITE will be unchanged. Use this if You don't trust
  107.             vb2091.
  108.  
  109.     NOCACHE If this option is specified, the DataCache will be disabled
  110.             before CopyMem() and enabled after finishing; this will speedup
  111.             CopyMem() (at least on a 040). This has not been tested very
  112.             well, so be careful with this option.
  113.  
  114.     MAXN    <number> (default: 16)
  115.     MIN1BUF <size in kilobytes> (default: 128)
  116.     MIN2BUF <size in kilobytes> (default: 64)
  117.             These options can be used to adjust some parameters which are
  118.             used with double buffering. If a block of size l is to be read
  119.             then vb2091 will probably split the transfer into smaller blocks
  120.             for better use of double buffering. If l<MIN1BUF then vb2091
  121.             will use one transfer of l bytes (i.e. no double buffering), if
  122.             possible. If l>MAXN*MIN2BUF then the transfer will be split into
  123.             MAXN parts. If none of those conditions is true then the transfer
  124.             will be split into blocks of size MIN2BUF.
  125.             I thought about a rather simple method to let the user adjust the
  126.             buffers in different situations without having to specify one
  127.             BUFSIZE for almost every single transfer size. The method I used is
  128.             just heuristic and the default values were chosen rather arbitrary
  129.             and optimal values may be quite different (especially on different
  130.             systems). MIN2BUF shall be set to the smallest size which achieves
  131.             good transfer speeds with little cpu usage. So MIN2BUF is the value
  132.             which should usually be used as buffer size (yielding high rates
  133.             and as many chunks, i.e. best use of double buffering, as possible).
  134.             But if the transfer size is a little larger than MIN2BUF, it
  135.             wouldn't be a good idea to usee double buffering with those chunks.
  136.             E.g. with MIN2BUF=64k a 65k transfer would be split up in a 64k
  137.             transfer and a 1k transfer. Although I haven't tested it, one 65k
  138.             transfer should be better. Because of this You can prevent double
  139.             buffering for any transfers less than MIN1BUF. I set
  140.             MIN1BUF=2*MIN2BUF for default, but this may be too large.
  141.             Now if You have very large transfers (e.g. 4MB), then it would be
  142.             split up into 64 64k chunks. But from a certain number of chunks it
  143.             should be better not to raise the number of chunks but the size of
  144.             the chunks (especially as MIN2BUF should be set as small as
  145.             possible). This is what MAXN is for - however this is rather
  146.             theoretical, because I doubt that transfers that large will occur
  147.             often (if at all).
  148.             As said before this method can be argued (especially as I almost
  149.             haven't tested if my thoughts are true in reality) and the default
  150.             values may be far from optimal. So everybody who wants almost
  151.             optimal performance has to find out his personal values (they also
  152.             depend on the applications You use, because You can configure
  153.             vb2091 for best speed or least cpu usage or something inbetween).
  154.  
  155.  
  156.     Example:
  157.         run >NIL: vb2091 DEVICE scsi.device BUFSIZE 128 MAXN 8 UNIT 046
  158.  
  159.  
  160.     You can remove the patch by sending vb2091 a CTRL-C/break - but don't
  161.     do this while any program is using the device.
  162.  
  163.  
  164. SOURCE
  165.  
  166.     I decided to distribute the source in order to raise chances of finding
  167.     bugs. You should be able to compile it using gcc (I used 2.3.3) or SAS.
  168.     It is NOT meant to be an example of good programming and I am not liable
  169.     for anyone turning into stone after looking at it.
  170.  
  171.  
  172. CREDITS
  173.  
  174.     This program would not exist without the help of Olaf Seibert (another
  175.     poor fellow with a broken A4000) who encouraged me to write it and
  176.     provided me with helpful information. Thank You, Olaf!
  177.     Thomas Boerkel did the changes for SAS and compiled it.
  178.     Several testers helped to remove some bugs of the older versions and made
  179.     suggestions for improvement.
  180.  
  181. LEGAL
  182.  
  183.     vb2091 may be freely distributed as long as no part of the distribution
  184.     is changed.
  185.  
  186.     This program is Bearware: If You like it, You can send me something
  187.                               with a bear on it.
  188.  
  189.     But more important:
  190.  
  191.         If You try it, please send me Your experiences, bugreports,
  192.         suggestions etc.
  193.  
  194.  
  195.  
  196.  
  197. Volker Barthelmann
  198. Kennedy-Ring 39
  199. 91301 Forchheim
  200. Germany
  201.  
  202. I should be reachable per eMail via:
  203.  
  204. volker@vb.franken.de
  205.  
  206.  
  207.